import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: ()=>import('@/components/login.vue')
    },
    {
      path: '/',
      name: 'dashboard',
      redirect: '/Store/index',
      component: ()=>import('@/Layout/index.vue')
    },
    {
      path: '/Store',
      component: ()=>import('@/Layout/index.vue'),
      children: [
        {
          path: 'index',
          component: ()=>import('@/views/Store/index.vue')
        },
        {
          path: 'store',
          component: ()=>import('@/views/Store/store.vue')
        }
      ]
    },
    {
      path: '/Channel',
      component: ()=>import('@/Layout/index.vue'),
      children: [
        {
          path: 'index',
          component: ()=>import('@/views/Channel/index.vue')
        },
      ]
    },
  ]
})

export default router
